import requests
from loguru import logger

class Login:
    def __init__(self):
        self._plat_token = self.plat_login()

    def plat_login(self):
        data = {
            "method":"post",
            "url":"https://api.admin.merchant.java.crmeb.net/api/admin/platform/login",
            "headers":{"content-type":"application/json"},
            "json":{"account":"demo","pwd":"crmeb.com","captchaVO":{}}
        }
        logger.info("请求参数：{}".format(data))
        res = requests.request(**data)
        logger.info("响应参数:{}".format(res.text))
        return res.json()["data"]["token"]

    def _mer_login(self):
        pass

if __name__ == '__main__':
    Login()